﻿namespace HiMap.MapControls
{
    using HiMap.MapControls.ResourceFile;
    using System;
    using System.Resources;

    public class Setup
    {
        private static LanguageType _Language = LanguageType.Chinese;
        private static ResourceManager temp = new ResourceManager("HiMap.MapControls.ResourceFile.Language-Chinese", typeof(Language_Chinese).Assembly);

        internal static string GetInfo(string str)
        {
            return temp.GetString(str);
        }

        public static LanguageType Language
        {
            get
            {
                return _Language;
            }
            set
            {
                _Language = value;
                switch (_Language)
                {
                    case LanguageType.Chinese:
                        temp = new ResourceManager("HiMap.MapControls.ResourceFile.Language-Chinese", typeof(Language_Chinese).Assembly);
                        return;

                    case LanguageType.English:
                        temp = new ResourceManager("HiMap.MapControls.ResourceFile.Language-English", typeof(Language_English).Assembly);
                        return;
                }
            }
        }
    }
}

